import React, { PureComponent } from 'react';

import { 
	Row, 
	Col, 
	Modal, 
	Form, 
	Input, 
	Radio, 
	Upload, 
	Tabs, 
	Divider, 
	Table,
	Button, 
	Checkbox, 
} from 'antd';

import {
  messageSuccess,
  modalConfirm,
  CONFIRM_MODAL_OK,
  modalError,
} from 'utils/feedbacks';

import styles from './index.css';

const { TabPane } = Tabs;

const CheckboxGroup = Checkbox.Group;

class Index extends PureComponent {
	constructor(props) {
		super(props);
	}

	state = {
		TabsDefaultActiveKey: 1
	};
	//站点
	columns = [
    {
      title: '站点名称',
      dataIndex: 'name',
    },
    {
      title: '修改',
			dataIndex: 'edit',
			render: edit => (
        <>
          {
            edit == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '删除',
			dataIndex: 'cutout',
			render: cutout => (
        <>
          {
            cutout == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '预览',
			dataIndex: 'preview',
			render: preview => (
        <>
          {
            preview == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
		{
      title: '发布',
			dataIndex: 'release',
			render: release => (
        <>
          {
            release == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '权限设置',
			dataIndex: 'permissionsetting',
			render: permissionsetting => (
        <>
          {
            permissionsetting == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '站点模板',
			dataIndex: 'sitetemplate',
			render: sitetemplate => (
        <>
          {
            sitetemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '新增',
			dataIndex: 'newlyadded',
			render: newlyadded => (
        <>
          {
            newlyadded == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
  ];
	//栏目
	columncolumns = [
    {
      title: '站点名称',
      dataIndex: 'name',
		},
		{
      title: '新建栏目',
			dataIndex: 'addcolumn',
			render: addcolumn => (
        <>
          {
            addcolumn == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '修改栏目',
			dataIndex: 'editcolumn',
			render: edit => (
        <>
          {
            edit == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '删除栏目',
			dataIndex: 'cutoutcolumn',
			render: cutoutcolumn => (
        <>
          {
            cutoutcolumn == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '预览栏目',
			dataIndex: 'previewcolumn',
			render: previewcolumn => (
        <>
          {
            previewcolumn == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
		{
      title: '发布栏目',
			dataIndex: 'releasecolumn',
			render: releasecolumn => (
        <>
          {
            releasecolumn == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '扩展字段',
			dataIndex: 'extendedfield',
			render: extendedfield => (
        <>
          {
            extendedfield == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '管理回收站',
			dataIndex: 'managerecyclebin',
			render: managerecyclebin => (
        <>
          {
            managerecyclebin == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '设置权限',
			dataIndex: 'settemplate',
			render: settemplate => (
        <>
          {
            settemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '设置栏目模板',
			dataIndex: 'setcolumntemplate',
			render: setcolumntemplate => (
        <>
          {
            setcolumntemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
  ];
	//文章
	articlecolumns = [
    {
      title: '站点名称',
      dataIndex: 'name',
		},
		{
      title: '新建文章',
			dataIndex: 'addarticle',
			render: addarticle => (
        <>
          {
            addarticle == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '编辑文章',
			dataIndex: 'editarticle',
			render: editarticle => (
        <>
          {
            editarticle == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '调整顺序',
			dataIndex: 'adjusttheorder',
			render: adjusttheorder => (
        <>
          {
            adjusttheorder == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '设置置顶',
			dataIndex: 'setthetop',
			render: setthetop => (
        <>
          {
            setthetop == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
		{
      title: '删除文章',
			dataIndex: 'deletearticle',
			render: deletearticle => (
        <>
          {
            deletearticle == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '恢复文章',
			dataIndex: 'recoveryarticle',
			render: recoveryarticle => (
        <>
          {
            recoveryarticle == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '查看列表',
			dataIndex: 'viewlist',
			render: viewlist => (
        <>
          {
            viewlist == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '查看文章',
			dataIndex: 'viewarticle',
			render: viewarticle => (
        <>
          {
            viewarticle == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '发布文章',
			dataIndex: 'postarticles',
			render: postarticles => (
        <>
          {
            postarticles == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '移动文章',
			dataIndex: 'movearticles',
			render: movearticles => (
        <>
          {
            movearticles == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '修改文章状态',
			dataIndex: 'modifyarticlestatus',
			render: modifyarticlestatus => (
        <>
          {
            modifyarticlestatus == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '复制文章',
			dataIndex: 'copyarticles',
			render: copyarticles => (
        <>
          {
            copyarticles == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '设置文章模板',
			dataIndex: 'setarticletemplate',
			render: setarticletemplate => (
        <>
          {
            setarticletemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
  ];

	//模板
	templatecolumns=[
		{
      title: '站点名称',
      dataIndex: 'name',
    },
    {
      title: '新建模板',
			dataIndex: 'addtemplate',
			render: addtemplate => (
        <>
          {
            addtemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
    {
      title: '修改模板',
			dataIndex: 'edittemplate',
			render: edittemplate => (
        <>
          {
            edittemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
		{
      title: '删除模板',
			dataIndex: 'deletetemplate',
			render: deletetemplate => (
        <>
          {
            deletetemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '查看模板',
			dataIndex: 'seetemplate',
			render: seetemplate => (
        <>
          {
            seetemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '导入模板',
			dataIndex: 'importtemplate',
			render: importtemplate => (
        <>
          {
            importtemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
		},
		{
      title: '导出模板',
			dataIndex: 'exporttemplate',
			render: exporttemplate => (
        <>
          {
            exporttemplate == "1" ?
              (
                <Checkbox checked></Checkbox>
              ) :
              (
                <Checkbox></Checkbox>
              )
          }
        </>
      )
    },
	];

	render() {
		const { getFieldDecorator } = this.props.form;
		const { visible } = this.props.modalState;
		const list = [
			{
				id: 1,
				name:'厦门市总工会',
				edit: '1',
				newlyadded: '1',
				sitetemplate: '1',
				permissionsetting: '1',
				release: '1',
				preview: '1',
				cutout:'1'
			},
			{
				id: 2,
				name:'工会视窗',
				edit: '0',
				newlyadded: '0',
				sitetemplate: '0',
				permissionsetting: '1',
				release: '1',
				preview: '0',
				cutout:'1'
			},
			{
				id: 3,
				name:'工会视窗',
				edit: '0',
				newlyadded: '0',
				sitetemplate: '0',
				permissionsetting: '1',
				release: '1',
				preview: '0',
				cutout:'1'
			},
			{
				id: 4,
				name:'工会视窗',
				edit: '0',
				newlyadded: '0',
				sitetemplate: '0',
				permissionsetting: '1',
				release: '1',
				preview: '0',
				cutout:'1'
			},
			{
				id: 5,
				name:'工会视窗',
				edit: '0',
				newlyadded: '0',
				sitetemplate: '0',
				permissionsetting: '1',
				release: '1',
				preview: '0',
				cutout:'1'
			},
			{
				id: 6,
				name:'工会视窗',
				edit: '0',
				newlyadded: '0',
				sitetemplate: '0',
				permissionsetting: '1',
				release: '1',
				preview: '0',
				cutout:'1'
			},
		];

		const columnlist = [
			{
				id: 1,
				name:'厦门市总工会',
				addcolumn: '1',
				editcolumn: '1',
				settemplate: '1',
				setcolumntemplate: '1',
				managerecyclebin: '1',
				extendedfield: '1',
				releasecolumn: '1',
				previewcolumn: '1',
				cutoutcolumn: '1' 
			},
			{
				id: 2,
				name:'工会视窗',
				addcolumn: '1',
				editcolumn: '1',
				settemplate: '1',
				setcolumntemplate: '1',
				managerecyclebin: '1',
				extendedfield: '1',
				releasecolumn: '1',
				previewcolumn: '1',
				cutoutcolumn: '1' 
			},
			{
				id: 3,
				name:'工会视窗',
				addcolumn: '1',
				editcolumn: '1',
				settemplate: '1',
				setcolumntemplate: '1',
				managerecyclebin: '1',
				extendedfield: '1',
				releasecolumn: '1',
				previewcolumn: '1',
				cutoutcolumn: '1' 
			},
			{
				id: 4,
				name:'工会视窗',
				addcolumn: '1',
				editcolumn: '1',
				settemplate: '1',
				setcolumntemplate: '1',
				managerecyclebin: '1',
				extendedfield: '1',
				releasecolumn: '1',
				previewcolumn: '1',
				cutoutcolumn: '1' 
			},
			{
				id: 5,
				name:'工会视窗',
				addcolumn: '1',
				editcolumn: '1',
				settemplate: '1',
				setcolumntemplate: '1',
				managerecyclebin: '1',
				extendedfield: '1',
				releasecolumn: '1',
				previewcolumn: '1',
				cutoutcolumn: '1' 
			},
			{
				id: 6,
				name:'工会视窗',
				addcolumn: '1',
				editcolumn: '1',
				settemplate: '1',
				setcolumntemplate: '1',
				managerecyclebin: '1',
				extendedfield: '1',
				releasecolumn: '1',
				previewcolumn: '1',
				cutoutcolumn: '1' 
			},
		];

		const articlelist = [
			{
				id: 1,
				name:'厦门市总工会',
				addarticle: '1',
				editarticle: '1',
				adjusttheorder: '1',
				setthetop: '1',
				deletearticle: '1',
				recoveryarticle: '1',
				viewlist: '1',
				viewarticle: '1',
				postarticles: '1',
				movearticles: '1',
				modifyarticlestatus: '1',
				modifyarticlestatus: '1',
				copyarticles: '1',
				setarticletemplate: '1',
			},
			{
				id: 2,
				name:'工会视窗',
				addarticle: '1',
				editarticle: '1',
				adjusttheorder: '1',
				setthetop: '1',
				deletearticle: '1',
				recoveryarticle: '1',
				viewlist: '1',
				viewarticle: '1',
				postarticles: '1',
				movearticles: '1',
				modifyarticlestatus: '1',
				modifyarticlestatus: '1',
				copyarticles: '1',
				setarticletemplate: '1',
			},
			{
				id: 3,
				name:'工会视窗',
				addarticle: '1',
				editarticle: '1',
				adjusttheorder: '1',
				setthetop: '1',
				deletearticle: '1',
				recoveryarticle: '1',
				viewlist: '1',
				viewarticle: '1',
				postarticles: '1',
				movearticles: '1',
				modifyarticlestatus: '1',
				modifyarticlestatus: '1',
				copyarticles: '1',
				setarticletemplate: '1',
			},
			{
				id: 4,
				name:'工会视窗',
				addarticle: '1',
				editarticle: '1',
				adjusttheorder: '1',
				setthetop: '1',
				deletearticle: '1',
				recoveryarticle: '1',
				viewlist: '1',
				viewarticle: '1',
				postarticles: '1',
				movearticles: '1',
				modifyarticlestatus: '1',
				modifyarticlestatus: '1',
				copyarticles: '1',
				setarticletemplate: '1',
			},
			{
				id: 5,
				name:'工会视窗',
				addarticle: '1',
				editarticle: '1',
				adjusttheorder: '1',
				setthetop: '1',
				deletearticle: '1',
				recoveryarticle: '1',
				viewlist: '1',
				viewarticle: '1',
				postarticles: '1',
				movearticles: '1',
				modifyarticlestatus: '1',
				modifyarticlestatus: '1',
				copyarticles: '1',
				setarticletemplate: '1',
			},
			{
				id: 6,
				name:'工会视窗',
				addarticle: '1',
				editarticle: '1',
				adjusttheorder: '1',
				setthetop: '1',
				deletearticle: '1',
				recoveryarticle: '1',
				viewlist: '1',
				viewarticle: '1',
				postarticles: '1',
				movearticles: '1',
				modifyarticlestatus: '1',
				modifyarticlestatus: '1',
				copyarticles: '1',
				setarticletemplate: '1',
			},
		];

		const templatelist = [
			{
				id: 1,
				name:'厦门市总工会',
				edittemplate: '1',
				addtemplate: '1',
				deletetemplate: '1',
				seetemplate: '1',
				importtemplate: '1',
				exporttemplate: '1',
			},
			{
				id: 2,
				name:'工会视窗',
				edittemplate: '1',
				addtemplate: '1',
				deletetemplate: '1',
				seetemplate: '1',
				importtemplate: '1',
				exporttemplate: '1',
			},
			{
				id: 3,
				name:'工会视窗',
				edittemplate: '1',
				addtemplate: '1',
				deletetemplate: '1',
				seetemplate: '1',
				importtemplate: '1',
				exporttemplate: '1',
			},
			{
				id: 4,
				name:'工会视窗',
				edittemplate: '1',
				addtemplate: '1',
				deletetemplate: '1',
				seetemplate: '1',
				importtemplate: '1',
				exporttemplate: '1',
			},
			{
				id: 5,
				name:'工会视窗',
				edittemplate: '1',
				addtemplate: '1',
				deletetemplate: '1',
				seetemplate: '1',
				importtemplate: '1',
				exporttemplate: '1',
			},
			{
				id: 6,
				name:'工会视窗',
				edittemplate: '1',
				addtemplate: '1',
				deletetemplate: '1',
				seetemplate: '1',
				importtemplate: '1',
				exporttemplate: '1',
			},
		];
		return (
			<Modal
				style={{ top: 10 }}
				width="75%"
				visible={visible}
				title="新建权限用户"
				wrapClassName={styles.choise_modal}
				closable={false}
				maskClosable={false}
				destroyOnClose={true}
				onCancel={this.formCanceledHandler}
				onOk={this.formSubmittedHandler}
			>
				<div className={styles.basic_form}>
					<Button type="primary" className={styles.serverBtnStyle}>保存</Button>
					<Form>
							<table>
									<tbody>
										<tr style={{display: 'inline-block'}}>
											<th>权限名称: </th>
											<td>
												<Form.Item>
														{
															getFieldDecorator('name', {
															})(
																<Input type="text" readOnly />
															)
														}
													</Form.Item>
											</td>
										</tr> 
										</tbody>
										</table>
					</Form>

					<Tabs type="card" defaultActiveKey={this.state.TabsDefaultActiveKey} onChange={this.keyChange}>
						<TabPane tab="站点类操作权限" key="1">
						<div className={styles.data_table}>
							{/* 数据表单 */}
							<Table
								rowKey="id"
								rowSelection={{
									onChange: this.tableRowSelectionChangedHandler
								}}
								columns={this.columns} 
								dataSource={list}
								pagination={false}
							/>
						</div>							

						</TabPane>
						<TabPane tab="栏目类操作权限" key="2">
							<div className={styles.data_table}>
								{/* 数据表单 */}
								<Table
									rowKey="id"
									rowSelection={{
										onChange: this.tableRowSelectionChangedHandler
									}}
									columns={this.columncolumns} 
									dataSource={columnlist}
									pagination={false}
								/>
							</div>	
						</TabPane>

						<TabPane tab="文章类操作权限" key="3">
							<div className={styles.data_table}>
								{/* 数据表单 */}
								<Table
									rowKey="id"
									scroll={{ 
										x: true
									}}
									rowSelection={{
										onChange: this.tableRowSelectionChangedHandler
									}}
									columns={this.articlecolumns} 
									dataSource={articlelist}
									pagination={false}
								/>
							</div>	
						</TabPane>

						<TabPane tab="模板类操作权限" key="4">
							<div className={styles.data_table}>
								{/* 数据表单 */}
								<Table
									rowKey="id"
									rowSelection={{
										onChange: this.tableRowSelectionChangedHandler
									}}
									columns={this.templatecolumns} 
									dataSource={templatelist}
									pagination={false}
								/>
							</div>	
						</TabPane>
					</Tabs>
				</div>
			</Modal>
		)
	}
	/**
	 * 标签页切换事件
	 */
	keyChange = (value) => {
		this.setState({
			TabsDefaultActiveKey: value
		})
	}

	/**
	 * 以下两者为复选框全选事件
	 */
	onChange = checkedList => {
    this.setState({
      checkedList,
      indeterminate: !!checkedList.length && checkedList.length < plainOptions.length,
      checkAll: checkedList.length === plainOptions.length,
    });
  };

  onCheckAllChange = e => {
    this.setState({
      checkedList: e.target.checked ? plainOptions : [],
      indeterminate: false,
      checkAll: e.target.checked,
    });
  };


	/**
	 * 关联模板pc文章选择按钮点击事件
	 */
	pcArticleChoice = () => {
		!!this.props.onPcArticleChoice && this.props.onPcArticleChoice();
	}

	/**
	 * 关联模板pc栏目选择按钮点击事件
	 */
	pcColumnChoice = () => {
		!!this.props.onPcColumnChoice && this.props.onPcColumnChoice();
	}

	/**
	 * 关联模板pc首页选择按钮点击事件
	 */
	pcIndexChoice = () => {
		!!this.props.onPcIndexChoice && this.props.onPcIndexChoice();
	}


	/**
	 * 关联模板H5栏目选择按钮点击事件
	 */
	h5ColumnChoice = () => {
		!!this.props.onH5ColumnChoice && this.props.onH5ColumnChoice();
	}

	/**
	 *  关联模板H5首页选择按钮点击事件
	 */
	h5IndexChoice = () => {
		!!this.props.onH5IndexChoice && this.props.onH5IndexChoice();
	}

	/**
	 * 关联模板h5文章选择按钮点击事件
	 */
	h5ArticleChoice = () => {
		!!this.props.onH5ArticleChoice && this.props.onH5ArticleChoice();
	}

	/**
   * 数据验证成功后回调事件
   */
  formSubmittedHandler = (event) => {
    // 关闭表单的默认提交行为
    event.preventDefault();

    // 获取表单域数据
		const fieldsValue = this.props.form.getFieldsValue();
		console.log(fieldsValue);
		//判断是基本配置还是其他配置
		if(this.state.TabsDefaultActiveKey == 1){
			const {
				h5ArticleTemplate,
				h5ColumnTemplate,
				h5StaticFile,
				h5IndexTemplate,
				pcArticleTemplate,
				pcColumnTemplate,
				pcIndexTemplate,
				pcStaticFile,
				siteName,
				siteHTTP,
				pcTerminal
			} = fieldsValue;
			if(siteName==''){
				modalError('站点名称不能为空!');
				return;
			}
			if(siteHTTP==''){
				modalError('站点HTTP不能为空!');
				return;
			}
			if(sort==''){
				modalError('排序不能为空!');
				return;
			}
		}else{
			const {
				SEOtitle,
				describe,
				keyword,
				notificationChannel,
				sort,
				releasePlan,
			} = fieldsValue;

		}
    // 整理表单数据
		const inputJSON = {};
		
    // const { name, KeyID, address, KeySecret } = fieldsValue;
    // if(name == ""){
    //   messageError('请输入名称!');
    //   return;
    // }
    // if(KeyID == ""){
    //   messageError('请输入KeyID!');
    //   return;
    // }
    // if(address == ""){
    //   messageError('请输入IP地址!');
    //   return;
    // }
    // if(KeySecret == ""){
    //   messageError('请输入KeySecret!');
    //   return;
    // }

    // // 名称
    // Object.assign(inputJSON, { name })
    // // KeyID
    // Object.assign(inputJSON, { KeyID })
    // // ip地址
    // Object.assign(inputJSON, { address })
    // // KeySecret
    // Object.assign(inputJSON, { KeySecret })
    // // 备注
    // const remarks = !!fieldsValue['remarks']? fieldsValue['remarks'] : '';
    // Object.assign(inputJSON, { remarks })
    // const gmtCreate = year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second;
    // Object.assign(inputJSON, { gmtCreate })
		!!this.props.onConfirm && this.props.onConfirm(inputJSON);
		this.props.form.resetFields();
  }


  /**
   * Modal 弹窗关闭回调事件
   */
  formCanceledHandler = () => {
		!!this.props.onCancel && this.props.onCancel();
		this.props.form.resetFields();
	}
	
}
export default Form.create({})(Index);